﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewSList.aspx.cs" Inherits="RGPWEB.EN.News.NewSList" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">
<link href="../../inc/Style/index.css" rel="Stylesheet" type="text/css" />
<link href="../../inc/Style/contentstyle.css" rel="Stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../../inc/script/pub.js"></script>
<link href="../../inc/Style/GridView.css" rel="Stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../../inc/script/My97DatePicker/WdatePicker.js"></script>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
         <div class="title">    
            <h1 class="on"><a href="javascript:void(0)">News List</a></h1>
             <h1><a href="News.aspx">New\Edit News</a></h1>
        </div>
        
        <div>
            <fieldset>
                <legend>Search Conditions</legend>
                <table style="width:100%">
                    <tr>
                        <td style="width: 30px">Title：</td>
                        <td style="width: 90px">
                            <asp:TextBox ID="txt_title" runat="server"></asp:TextBox>
                        </td>
                        <td style="width: 30px">
                                                        Content：</td>
                        <td style="width: 30px">
                            <asp:TextBox ID="txt_content" runat="server"></asp:TextBox>
                        </td>
                        <td>
                            Categories：</td>
                        <td>
                            <asp:DropDownList ID="ddl_Categories" runat="server">
                                <asp:ListItem Value="0">--Please Select--</asp:ListItem>
                                <asp:ListItem Value="1">Home</asp:ListItem>
                                <asp:ListItem Value="2">Product &amp; service</asp:ListItem>
                                <asp:ListItem Value="3">Electronic commerce course </asp:ListItem>
                                <asp:ListItem Value="4">Contact US</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                            <asp:Button ID="btn_search" runat="server" Text="Search" 
                                onclick="btn_search_Click" />
                        </td>
                    </tr>
                </table>
            </fieldset>
        </div>
        
        <div>
            <fieldset id="Fieldset2" style="width:98%">
                <legend> News List</legend>
                <asp:GridView ID="grv_list" runat="server" 
                    AutoGenerateColumns="False" DataKeyNames ="New_ID" 
                    onrowcommand="grv_list_RowCommand" onrowdatabound="grv_list_RowDataBound" 
                    CssClass="Grid" AllowSorting="True" 
                    onselectedindexchanging="grv_list_SelectedIndexChanging">
                    <FooterStyle CssClass="GridFooter" />
                    <RowStyle CssClass="Row" />
                    <HeaderStyle CssClass="HeadingCell" />
                    <Columns>
                        <asp:BoundField HeaderText="Title" DataField="New_Titile" ItemStyle-Width="10%" >
<ItemStyle Width="10%"></ItemStyle>
                        </asp:BoundField>
                        <asp:TemplateField HeaderText ="Categories" ItemStyle-Width="10%">
                            <ItemTemplate >
                                <asp:Label ID="lbl_Categories" runat="server" Text='<%# Eval("New_Categories") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Increase time " DataField="New_Time" ItemStyle-Width="10%">
<ItemStyle Width="10%"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField HeaderText="Operater" DataField="New_Opera" ItemStyle-Width="10%">
<ItemStyle Width="10%"></ItemStyle>
                        </asp:BoundField>
                        <asp:TemplateField >
                            <ItemTemplate>                                
                                <asp:Button ID="btn_edit" runat="server"  Text="Edit" CommandArgument='<%# Eval("New_ID")%>' CommandName="GetID"/>    
                            </ItemTemplate>   
                            <ItemStyle Width="5%" />             
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>      
                                <asp:Button ID="btn_del" runat="server"  Text="Del" CommandArgument='<%# Eval("New_ID")%>' CommandName="delID"/>            
                            </ItemTemplate> 
                            <ItemStyle Width="5%" />                 
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <webdiyer:AspNetPager ID="anp_list" runat="server" HorizontalAlign="Center" 
                    Width="100%" PageIndexBoxType="DropDownList" 
                    PageSize="10" CssClass="paginator" CurrentPageButtonClass="cpb"
                    FirstPageText="First" LastPageText="Last" NextPageText="Next" PrevPageText="UP" 
                    onpagechanging="anp_list_PageChanging">
                </webdiyer:AspNetPager>
             </fieldset>
          </div>
    </form>
</body>
</html>
